import com.mgfireworks.mgplatform.mgshop.index.RecommendProduct; //line: 2
import java.util.*;
import org.rythmengine.template.TemplateBase;
import java.io.*;

public class index_html__R_T_C__ extends private_projects_mgfireworks_mgplatform_mgshop_html___main_template_html__R_T_C__ {//<extended_resource_key>D:/private/projects/mgfireworks/mgplatform/mgshop/html///main_template.html</extended_resource_key>

	public java.lang.String __getName() {
		return "index.html";
	}

	protected void __setup() {
		if (__isDefVal(listRecommendProducts)) {listRecommendProducts = __get("listRecommendProducts",List.class) ;}
	}

	protected List<RecommendProduct> listRecommendProducts=null; //line: 3

	protected java.lang.String __renderArgName(int __pos) {
		int __p = 0;
		if (__p++ == __pos) return "listRecommendProducts";
		throw new ArrayIndexOutOfBoundsException();
	}

	protected java.util.Map<java.lang.String, java.lang.Class> __renderArgTypeMap() {
		java.util.Map<java.lang.String, java.lang.Class> __m = new java.util.HashMap<String, Class>();
		__m.put("listRecommendProducts", List.class);
		__m.put("listRecommendProducts__0", RecommendProduct.class);
		return __m;
	}

	@SuppressWarnings("unchecked")
	public TemplateBase __setRenderArgs(java.util.Map<java.lang.String, java.lang.Object> __args) {
		if (null == __args) throw new NullPointerException();
		if (__args.isEmpty()) return this;
		super.__setRenderArgs(__args);
		if (__args.containsKey("listRecommendProducts")) this.listRecommendProducts = __get(__args,"listRecommendProducts",List.class);
		return this;
	}

	@SuppressWarnings("unchecked") public TemplateBase __setRenderArgs(java.lang.Object... __args) {
		int __p = 0, __l = __args.length;
		if (__p < __l) { 
			Object v = __args[__p++]; 
			listRecommendProducts = __safeCast(v, List.class); 
			__renderArgs.put("listRecommendProducts",listRecommendProducts);
		}
		return this;
	}

	protected java.lang.Class[] __renderArgTypeArray() {
		return new java.lang.Class[]{List.class, };
	}

	@SuppressWarnings("unchecked") @Override public TemplateBase __setRenderArg(java.lang.String __name, java.lang.Object __arg) {
		if ("listRecommendProducts".equals(__name)) this.listRecommendProducts = __safeCast(__arg, List.class);
		super.__setRenderArg(__name, __arg);
		return this;
	}

	@SuppressWarnings("unchecked") public TemplateBase __setRenderArg(int __pos, java.lang.Object __arg) {
		int __p = 0;
				if (__p++ == __pos) { 
			Object v = __arg; 
			listRecommendProducts = __safeCast(v, List.class); 
			__renderArgs.put("listRecommendProducts", listRecommendProducts);
		}
		if(0 == __pos) __setRenderArg("arg", __arg);
		return this;
	}





	public org.rythmengine.utils.TextBuilder build(){
		buffer().ensureCapacity(1750);
p("<!--\n轮播广告\n-->\n<div id=\"slider\" class=\"mui-slider\" >\n<div class=\"mui-slider-group mui-slider-loop\">\n<!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->\n<div class=\"mui-slider-item mui-slider-item-duplicate\">\n<a href=\"item/01.html\">\n<img src=\"static/img/ad2.jpg\">\n</a>\n</div>\n<!-- 第一张 -->\n<div class=\"mui-slider-item\">\n<a href=\"item/01.html\">\n<img src=\"static/img/ad.jpg\">\n</a>\n</div>\n<!-- 第二张 -->\n<div class=\"mui-slider-item\">\n<a href=\"item/01.html\">\n<img src=\"static/img/ad2.jpg\">\n</a>\n</div>\n<!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->\n<div class=\"mui-slider-item mui-slider-item-duplicate\">\n<a href=\"item/01.html\">\n<img src=\"static/img/ad.jpg\">\n</a>\n</div>\n</div>\n<div class=\"mui-slider-indicator\">\n<div class=\"mui-indicator mui-active\"></div>\n<div class=\"mui-indicator\"></div>\n</div>\n</div>\n<!--\n通知、新闻\n-->\n<ul class=\"news-list mui-row\">\n<li class=\"mui-col-xs-12 mui-ellipsis\">\n<a href=\"news.html\">民生保障不是“清谈馆” 办好实事方能得民心,办好实事方能得民心</a>\n</li>\n<li class=\"mui-col-xs-12 mui-ellipsis\">\n<a href=\"news.html\">念念不忘棚户区改造，总理走过的地方说过的话</a>\n</li>\n</ul>\n<!--\n推荐产品\n-->\n"); //line: 55

if (org.rythmengine.utils.Eval.eval(listRecommendProducts)) { //line: 54
{
__Itr<RecommendProduct> __v0 = __Itr.valueOf(listRecommendProducts); //line: 55
int p_size = __v0.size(); //line: 55
if (p_size > 0) { //line: 55
int p_index = 0; //line: 55
for(RecommendProduct p : __v0) { //line: 55
p_index++; //line: 55
boolean p_isOdd = p_index % 2 == 1; //line: 55
java.lang.String p_parity = p_isOdd ? "odd" : "even"; //line: 55
boolean p_isFirst = p_index == 1; //line: 55
boolean p_isLast = p_index >= p_size; //line: 55
org.rythmengine.utils.RawData p_sep = new org.rythmengine.utils.RawData(p_isLast ? "" : ","); //line: 55
org.rythmengine.utils.RawData p__sep = new org.rythmengine.utils.RawData(org.rythmengine.utils.S.escape(p)+(p_isLast ? "" : ",")); //line: 55
org.rythmengine.internal.LoopUtil p_utils = new org.rythmengine.internal.LoopUtil(p_isFirst, p_isLast); //line: 55
org.rythmengine.internal.LoopUtil p__utils = new org.rythmengine.internal.LoopUtil(p_isFirst, p_isLast, p); //line: 55
__pushItrVar("p", p); //line: 55
p("<div class=\"tuijian mui-card\">\n<div class=\"mui-card-header mui-card-media\" style=\"height:50vw;background-image:url("); //line: 57
{ //line: 57
	org.rythmengine.template.ITag.__ParameterList _pl = null;  //line: 57
	_pl = new org.rythmengine.template.ITag.__ParameterList(); //line: 57
	_pl.add("",""); //line: 57
		__invokeTag(57, "url", _pl, false); //line: 57
} //line: 57

try{pe(p.getMainImg());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 57
p(")\"></div>\n<div class=\"mui-card-content\">\n<div class=\"mui-card-content-inner\">\n<p>类别:"); //line: 60

try{pe(p.getCategoryName());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 60
p(",品牌:"); //line: 60

try{pe(p.getBandName());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 60
p(",规格:，价格</p>\n<p style=\"color: #333;\">"); //line: 61

try{pe(p.getDescription());} catch (RuntimeException e) {__handleTemplateExecutionException(e);}  //line: 61
p("...</p>\n</div>\n</div>\n</div>\n"); //line: 64

	__popItrVar();
	}
}
}
 //line: 65
} //line: 66

		return this;
	}

}
